import { AxiosRequestConfig } from '../types/index'
import { isDate, isObject } from './util'

export function processRequestData(config: AxiosRequestConfig) {
  let { data } = config
  if (isObject(data)) {
    data = JSON.stringify(data)
  }
  return data
}
